	             <!-- /.box-header -->
	             <div class="box-body">	             
	           		<div class="row">
	            	<div class="col-sm-12">
		              <table id="list-table" class="table table-bordered table-striped dataTable">
		                 <thead>
		                   <tr role="row">
			                   <th class="sorting" tabindex="0" style="text-align: center;">活动名称</th>
			                   <th class="sorting" tabindex="0" style="text-align: center;">活动类型</th>
			                   <th class="sorting" tabindex="0" style="text-align: center;">店铺名称</th>
			                   <th class="sorting" tabindex="0" style="text-align: center;">折扣率%</th>
							   <th class="sorting" tabindex="0" style="text-align: center;">限购数</th>
							   <th class="sorting" tabindex="0" style="text-align: center;">扣点</th>
			                   <th class="sorting" tabindex="0" style="text-align: center;">开始时间</th>
			                   <th class="sorting" tabindex="0" style="text-align: center;">结束时间</th>
			                   <th style="text-align: center;">状态</th>
			                   <th style="text-align: center;">排序</th>
			                   <th class="sorting" tabindex="0" style="text-align: center;">操作</th>
		                   </tr>
		                 </thead>

						<tbody>
						  <foreach name="prom_list" item="vo" key="k" >
						  	<tr role="row" align="center">
		                     <td>{$vo.name|getSubstr=0,30}</td>
		                     <td>{$parse_type[$vo[type]]}</td>
		                     <td>{$vo.store_name}</td>
		                     <td style="color: green;">{$vo.expression}</td>
							 <td style="color: red;">{$vo.xiangou}</td>
							 <!--<td style="color: red;">{$vo.prom_kou}</td>-->
							 	<td class="text-left"><input type="text" onchange="updateSort('prom_goods','id','{$vo.id}','prom_kou',this)"  onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" maxlength="3" value="{$vo.prom_kou}" class="input-sm" style="width: 50px;text-align: center;" /></td>

							
								<td>{$vo.start_time|date='Y-m-d H:i',###}</td>
								<td>{$vo.end_time|date='Y-m-d H:i',###}</td>
							 <td>{$vo.state}</td>
								<td class="text-left"><input type="text" onchange="updateSort('prom_goods','id','{$vo.id}','orderby',this)"  onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" maxlength="3" value="{$vo.orderby}" class="input-sm" style="width: 50px;text-align: center;" /></td>

								<td>
		                      <a href="javascript:;" data-url="{:U('Promotion/dget_goods',array('id'=>$vo['id']))}" onclick='goodsinfo("{:U('Promotion/dget_goods',array('id'=>$vo['id']))}")' data-toggle="tooltip" title="" class="btn btn-info goods_list">查看商品</a>
		                  
		                      <if condition='$vo.status eq 0 AND $vo.end_time gt $time'>
		                      <a href="javascript:;" onclick="examine(1,{$vo.id})"  class="btn btn-info goods_list">通过</a>
		                      <a href="javascript:;" onclick="examine(2,{$vo.id})"  class="btn btn-info goods_list">不通过</a>
		                      </if>
								</td>
		                   </tr>
		                  </foreach>
		                   </tbody>
		               </table>
	               </div>
	          </div>
              <div class="row">
              	    <div class="col-sm-6 text-left"></div>
                    <div class="col-sm-6 text-right">{$page}</div>		
              </div>
	          </div>
	          <script>
	          
	          function goodsinfo(url){
                	var goods_id = []; 
                	//过滤选择重复商品
                // 	$('input[name*="goods_id"]').each(function(i,o){
                // 		goods_id.push($(o).val());
                // 	});
                
                    // var url = '/index.php?m=Seller&c=Promotion&a=search_goods&goods_id='+goods_id+'&t='+Math.random()+'&type=5';
                    layer.open({
                        type: 2,
                        title: '查看商品',
                        shadeClose: true,
                        shade: 0.3,
                        area: ['70%', '80%'],
                        content: url, 
                    });
                }
	              	$(".pagination  a").click(function(){
                		var page = $(this).data('p');
                		var number = $(this).data('n');
                		ajax_get_table('search-form2',page,number);
                	});
                
                	$(".page_num").change(function (){
                		var number = $(this).val();
                		ajax_get_table('search-form2',1,number);
                	})
                	//1=>审核通过2=》审核不通过
                function examine(status,id){
                    if(status == 1){
                        var msg = '审核通过'
                    }else{
                        var msg = '审核不通过'
                    }
                    layer.confirm('您确定'+msg+'吗？', {
            			btn: ['确定','取消'] //按钮
            		}, function(){
            		        if(status == 1){
            		            $.ajax({
                					type:'post',
                					url:"{:U('Admin/Promotion/examine')}",
                					data:{status:status,id:id,notes:''},
                					success:function(res){
                						if(res){
                				// 			layer.close(index);
                							layer.closeAll();
                				// 			let data = JSON.parse(res);
                							if(res.status == 1){
                								layer.msg(res.msg, {icon:1},function(){
                									ajax_get_table('search-form2',1,0)
                								});
                							}else{
                								layer.msg(res.msg, {icon:5},function(){});
                							}
                
                						}
                					}
                				});
            		        }else{
            		            layer.prompt({
                    				formType: 2,
                    				title: '请输入理由',
                    			}, function(value, index, elem){
                    				$.ajax({
                    					type:'post',
                    					url:"{:U('Admin/Promotion/examine')}",
                    					data:{status:status,id:id,notes:value},
                    					success:function(res){
                    						if(res){
                    				// 			layer.close(index);
                    							layer.closeAll();
                    				// 			let data = JSON.parse(res);
                    							if(res.status == 1){
                    								layer.msg(res.msg, {icon:1},function(){
                    									ajax_get_table('search-form2',1,0)
                    								});
                    							}else{
                    								layer.msg(res.msg, {icon:5},function(){});
                    							}
                    
                    						}
                    					}
                    				});
                    			});
            		        }
            		        
            		  
            			
            		})
                }
	          </script>